package com.gxdf.extendedcontrols.gxdfclient.components;

import java.io.Serializable;
import java.util.ArrayList;

public class GxdfForm{
	
	String name;
	String description;
	String instanceName;
	
	ArrayList<IGxdfItem> fields;

	public GxdfForm() {		
		fields = new ArrayList<IGxdfItem>();		
	}
	
	public void addField(IGxdfItem f){
		fields.add(f);
	}
	
	public String getFormData(){
		
		String res=null;
		
		if (fields.size() == 0 ) return "";
		
		for(IGxdfItem f : fields){			
			res.concat(f.getValue());			
		}
		
		return res;
		
	}
	
	public ArrayList<IGxdfItem> getFields(){
		return this.fields;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getInstanceName() {
		return instanceName;
	}

	public void setFormInstance(String instanceName) {
		this.instanceName = instanceName;
	}
	
	
	
	

}
